import cv2

capture = cv2.VideoCapture(0);

while True:
    # 读取并显示每一帧
    ret , frame = capture.read();
    cv2.imshow("Camera",frame);

    key = cv2.waitKey(1);

    if key != -1:
        break;

capture.release() 

